Swap Method (SparseArray<T>)
In This Topic
Swaps a range of elements from an SparseArray starting at the specified source index with another SparseArray starting at the specified target index. The length and the indexes are specified as 32-bit integers.
Syntax
'Declaration
Public Shared Sub Swap( _
ByVal As SparseArray(Of T), _
ByVal As Integer, _
ByVal As SparseArray(Of T), _
ByVal As Integer, _
ByVal As Integer _
)
'Usage
Dim source As SparseArray(Of T)
Dim sourceIndex As Integer
Dim target As SparseArray(Of T)
Dim targetIndex As Integer
Dim length As Integer
SparseArray(Of T).Swap(source, sourceIndex, target, targetIndex, length)
public static void Swap(
SparseArray<T> ,
int ,
SparseArray<T> ,
int ,
int
)
Parameters
- source
- The SparseArray that contains the data to swap.
- sourceIndex
- A 32-bit integer that represents the index in the source at which swapping begins.
- target
- The SparseArray that receives the data.
- targetIndex
- A 32-bit integer that represents the index in the target at which storing begins.
- length
- A 32-bit integer that represents the number of elements to swap.
See Also